﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.ComponentModel.DataAnnotations;

namespace QuanLyNhaThuoc.Models
{
    public class AccountModel
    {
        [DataType(DataType.Text)]
        public string UserName { get; set; }

        [DataType(DataType.Password)]
        public string PassWord { get; set; }

        public bool RememberMe { get; set; }
    }

    public interface IFunction
    {
        void Login(string UserName, bool Cookie);
        void LogOut();
    }

    public class IFunctionService : IFunction
    {
        public void Login(string UserName, bool Cookie)
        {
            FormsAuthentication.SetAuthCookie(UserName, Cookie);
        }
        public void LogOut()
        {
            FormsAuthentication.SignOut();
        }
    }
}